package controllers

import (
	"github.com/astaxie/beego"
)

type Main1Controller struct {
	beego.Controller
}

func (this *Main1Controller) Get() {
	//this.Ctx.WriteString("appname:" + beego.AppConfig.String("appname"))
	//this.Ctx.WriteString("\n\n appname:" + beego.AppName)
	//hp := strconv.Itoa(beego.HttpPort)
	//this.Ctx.WriteString("\n\n port:" + hp)
	this.Data["Website"] = "www.54json.com"
	this.Data["Email"] = "xiaofei.lu@foxmail.com"
	this.Data["test"] = true
	this.Data["isLogin"] = checkAccount(this.Ctx)

	type Student struct {
		Name    string
		Age     int
		Guake   bool
		Classes []string
		Price   float32
	}
	st := &Student{
		"Xiao Ming",
		16,
		true,
		[]string{"Math", "English", "Chinese"},
		9.99,
	}
	this.Data["st"] = st
	this.Data["json"] = st
	//this.ServeJSON()
	//this.TplName = "index.html"

}
